<tr>
  <td>@if($data->pid == 0) <b>{{ $data->name }}</b> @else ----{{$data->name}} @endif</td>
  <td><img src="{{Storage::url($data->icon)}}" alt="" width="30" height="30"></td>
  
  <td>{{ $data->sort??0 }}</td>
  <td>@if($data->pid == 0) {{ $data->goods_total_count }} @else {{ $data->goods_count }} @endif</td>
  <td>
    <a href="{{route('admin.categories.edit', $data)}}" class="badge badge-info text-white">编辑</a>
    <a class="badge badge-danger text-white" data-url="{{route('admin.categories.destroy', $data)}}">删除</a>
  </td>
</tr>
{{$slot}}